import service from '@/utils/request'

const BASE_URL = 'api-system'

//名师讲堂列表
export function listTeacherLecture(data) {
    return service({
        url: `${BASE_URL}/teacher-lectures`,
        method: 'get',
        params: data
    })
}

// 保存名师讲堂
export function saveTeacherLecture(data) {
    return service({
        url: `${BASE_URL}/teacher-lecture`,
        method: 'post',
        data
    })
}

// 修改名师讲堂
export function updateTeacherLecture(data) {
    return service({
        url: `${BASE_URL}/teacher-lecture`,
        method: 'put',
        data
    })
}

//名师讲堂详情
export function getTeacherLecture(lectureId) {
    return service({
        url: `${BASE_URL}/teacher-lecture/${lectureId}`,
        method: 'get'
    })
}

//删除名师讲堂
export function deleteTeacherLecture(lectureId) {
    return service({
        url: `${BASE_URL}/teacher-lecture/${lectureId}`,
        method: 'delete'
    })
}

//修改名师讲堂状态
export function updateTeacherLectureStatus(lectureId,status) {
    return service({
        url: `${BASE_URL}/teacher-lecture/${lectureId}/status/${status}`,
        method: 'put'
    })
}
